import { createI18n } from "vue-i18n";
import messages from "./lang/index";
export type Language = "zh_CN" | "en_US";
export const language = messages;
let global = window.localStorage.getItem("global") as any;
if (global) {
  global = JSON.parse(global);
}

export const i18n = createI18n({
  locale: global?.locale || "zh_CN",
  // globalInjection: true,
  // legacy: false,
  messages: messages,
});
